"""
Website Controller - 基于Kopf的Kubernetes Operator

这个模块提供了一个完整的Kubernetes Operator实现，用于管理Website自定义资源。
它遵循了argo_settings项目的代码组织方式和设计模式。

主要组件：
- Website: Website Kubernetes资源的接口类
- WebsiteSpec: Website规格定义和验证
- WebsiteResourceManager: 管理Kubernetes资源的创建、更新和删除
- Controller: 处理Website CR的创建、更新、删除事件

技术栈：
- Python 3.8+
- Kopf (Kubernetes Operator Pythonic Framework)
- Kubernetes Python Client
- asyncio (异步处理)

功能特性：
1. 监听Website CR的创建、更新、删除事件
2. 自动创建和管理Deployment、Service等Kubernetes资源
3. 状态管理和事件报告
4. 错误处理和重试机制
5. 资源依赖管理和生命周期控制
"""

from .api import (
    Website,
    WebsiteSpec,
    WebsitePhase,
    WebsiteConditionType,
    ImageSpec,
    ServiceSpec,
    HealthCheckSpec,
    ResourceSpec,
    EnvVarSpec,
    ImagePullPolicy,
    ServiceType,
    GROUP,
    VERSION,
    KIND,
    PLURAL,
    API_VERSION
)

from .resource_manager import (
    WebsiteResourceManager,
    WebsiteResourceType
)

from .controller import (
    on_website_create,
    on_website_update,
    on_website_delete,
    on_login,
    on_startup,
    add_condition,
    generate_resource_name
)

__all__ = [
    # API Classes
    'Website',
    'WebsiteSpec',
    'WebsitePhase',
    'WebsiteConditionType',
    'ImageSpec',
    'ServiceSpec',
    'HealthCheckSpec',
    'ResourceSpec',
    'EnvVarSpec',
    'ImagePullPolicy',
    'ServiceType',
    
    # Resource Manager
    'WebsiteResourceManager',
    'WebsiteResourceType',
    
    # Controller Functions
    'on_website_create',
    'on_website_update',
    'on_website_delete',
    'on_login',
    'on_startup',
    'add_condition',
    'generate_resource_name',
    
    # Constants
    'GROUP',
    'VERSION',
    'KIND',
    'PLURAL',
    'API_VERSION'
]

__version__ = "1.0.0"
__author__ = "Website Controller Team"
__description__ = "Kubernetes Operator for managing Website custom resources"
